package com.k8.common.aop.internal.joinpoint;

import com.k8.common.aop.internal.invocation.ReflectiveMethodInvocation;

public class ProceedingJoinPoint {
    private final JoinPoint joinPoint;
    private final ReflectiveMethodInvocation invocation;

    public ProceedingJoinPoint(JoinPoint joinPoint, ReflectiveMethodInvocation invocation) {
        this.joinPoint = joinPoint;
        this.invocation = invocation;
    }

    public Object proceed() throws Throwable {
        return invocation.invocableClone().proceed();
    }

    public JoinPoint getJoinPoint() {
        return joinPoint;
    }
}
